<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/header.css" />
	
	<h:form id="form_header" styleClass="form_header" >
	
		<p:dock id="dock_configurations" position="top" widgetVar="dockHeader" >
			<p:menuitem id="menuItem_home" icon="resources/images/home_dock.png" update=":panelGroup_home" >
				<f:setPropertyActionListener target="#{mainBean.currentPage}" value="news.xhtml" />
			</p:menuitem>
			<p:menuitem id="menuItem_facebook" icon="resources/images/facebook_dock.png" rendered="#{permissionBean.logged}" />
			<p:menuitem id="menuItem_twitter" icon="resources/images/twitter_dock.png"  rendered="#{permissionBean.logged}" />
			<p:menuitem id="menuItem_linkedin" icon="resources/images/linkedin_dock.png" rendered="#{permissionBean.logged}" />
			<p:menuitem id="menuItem_email" icon="resources/images/email_dock.png" rendered="#{permissionBean.logged}" />
			<p:menuitem id="menuItem_settings" icon="resources/images/settings_dock.png" rendered="#{permissionBean.logged}" 
				ajax="false" action="settings">
				<f:setPropertyActionListener target="#{mainBean.settingsPage}" value="#{null}" />
			</p:menuitem>
			<p:menuitem id="menuItem_logout" icon="resources/images/logout_dock.png" action="#{mainBean.logout}" 
				ajax="false" rendered="#{permissionBean.logged}"  process="@this" />
			<p:menuitem id="menuItem_login" icon="resources/images/login_dock.png" rendered="#{!permissionBean.logged}"
				 action="#{mainBean.prepareLogin}" update=":panelGroup_home" >
				<f:setPropertyActionListener target="#{mainBean.currentPage}" value="login.xhtml" />
			</p:menuitem>
		</p:dock>
		
	</h:form>
	<p:confirmDialog header="Oooops!!!" severity="alert" 
                         visible="#{not empty param['expired']}" 
                         message="#{msg.view_expired}" widgetVar="confirmDlg">
            <p:commandButton type="button" value="OK!" onclick="confirmDlg.hide()" />
    </p:confirmDialog>
	<h:panelGroup id="panelgroupnewsletter_header" rendered="#{!permissionBean.logged}">
		<ui:include src="newsletter_create.xhtml" />
	</h:panelGroup>
</html>